<?php
///**
// *
// * Created by PhpStorm
// * Date: 2023/2/9
// * Time: 11:08
// * docs:
// */
//
//use hhz\constant\redis\redisKeys;
//use Hhz\Redis\cacheRedis;
//use Biz\cache\album\AlbumListCache;
//use Biz\model\Album\AlbumWikiListModel;
//
//ini_set('display_errors', 1);
//error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING ^ E_DEPRECATED);
//ini_set('memory_limit', '1024M');
//
//require_once '/data/wwwroot/g_vendor/autoload.php';
//
////$aList = AlbumListCache::keys('album_list*');
////$albumIds = [];
////foreach ($aList as $item) {
////    $albumIds[] = trim(str_replace('album_list', '', $item));
////}
////
////
////
////AlbumListCache::hmset('test_1' ,[1=>1,2=>2]);
////
////
//////$a = AlbumListCache::hmget('test_1',1);
////$a = AlbumListCache::hkeys('test_1');
////
////echo "</pre>";
////print_r($a);
////echo "</pre>";
////die();
////
////
////
////[$cacheData, $noCacheKeys] = AlbumListCache::mGetItems($albumIds);
////
//
//$testJson = '{"00002311200903wc":{"id":"2701","album_id":"00002311200903wc","uid":"15121596","title":"我让我朋友","desc":"","publish_time":"1675661929","cover_img":"https:\/\/img.alicdn.com\/i4\/2495741137\/O1CN016tj2VY1KGn0qzsycZ_!!2495741137.jpg","tags":"","status":"7","wiki_count":"1","admin_id":"0","addtime":"2023-02-06 13:38:49","edittime":"2023-02-06 13:38:49","score":"0","quality":"0","publish_time_string":"2023-02-06 13:38","cover_img_url":"https:\/\/img.alicdn.com\/i4\/2495741137\/O1CN016tj2VY1KGn0qzsycZ_!!2495741137.jpg","status_name":"用户设置私密状态"},"00000mg12004q4ob":{"id":"808","album_id":"00000mg12004q4ob","uid":"7937579","title":"兔子控 | 兔兔那么可爱怎么能不买兔兔","desc":"什么也阻挡不了我喜欢兔兔的心！","publish_time":"1663766854","cover_img":"https:\/\/img.haohaozhu.cn\/App-imageShow\/o_nphone\/791\/d287020ez0f00kW00rikat04q4ob?iv=1&sw=983&w=750&h=751","tags":"软装,摆件","status":"1","wiki_count":"11","admin_id":"0","addtime":"2022-09-21 21:27:34","edittime":"2022-09-22 18:29:42","score":"70","quality":"3","publish_time_string":"2022-09-21 21:27","cover_img_url":"https:\/\/img.haohaozhu.cn\/App-imageShow\/o_nphone\/791\/d287020ez0f00kW00rikat04q4ob?iv=1&sw=983&w=750&h=751","status_name":"已审核"},"000016g120000zdb":{"id":"1528","album_id":"000016g120000zdb","uid":"45839","title":"2022年度好物｜装点新家的美好家具","desc":"装点新家的品质家具好物，有颜值有实力！","publish_time":"1672115522","cover_img":"https:\/\/img.haohaozhu.cn\/App-imageShow\/o_nphone\/dde\/3408120wr0wq06I00rnj8rwzdb?iv=1&sw=7f5&w=750&h=749","tags":"软装,家具,双11好物","status":"1","wiki_count":"11","admin_id":"0","addtime":"2022-12-27 12:32:02","edittime":"2023-01-08 11:22:50","score":"80","quality":"4","publish_time_string":"2022-12-27 12:32","cover_img_url":"https:\/\/img.haohaozhu.cn\/App-imageShow\/o_nphone\/dde\/3408120wr0wq06I00rnj8rwzdb?iv=1&sw=7f5&w=750&h=749","status_name":"已审核"},"00000pj1200123sl":{"id":"919","album_id":"00000pj1200123sl","uid":"1777845","title":"不是极简生活也值得拥有的极简好物","desc":"在设计里\n其实有很多的风格\n极简就是其中的一种\n \n而我个人觉得\n最难也是最考验设计能力的就是极简\n少就是多\n做加法容易\n做减法难\n极简同时也代表了极致\n\n一件物品\n在满足功能和美观的前提下\n做到了极简\n那么这绝对是一件设计极致的物品\n就这点\n不值得拥有吗？\n反过来再想\n一件极简好物\n设计已达极致\n那么他的使用体验\n它的造型样式\n一定也是一流的\n所以，买它，不会错\n所以，用它，更幸福","publish_time":"1665469824","cover_img":"https:\/\/img.haohaozhu.cn\/App-imageShow\/o_nphone\/12b\/2aced20v60v70J800rjvs57123sl?iv=1&sw=169&w=750&h=750","tags":"软装","status":"1","wiki_count":"8","admin_id":"0","addtime":"2022-10-11 14:30:24","edittime":"2022-10-19 15:50:59","score":"70","quality":"3","publish_time_string":"2022-10-11 14:30","cover_img_url":"https:\/\/img.haohaozhu.cn\/App-imageShow\/o_nphone\/12b\/2aced20v60v70J800rjvs57123sl?iv=1&sw=169&w=750&h=750","status_name":"已审核"}}';
//
//$testArray = json_decode($testJson, true);
//
//$redis = new cacheRedis(redisKeys::KEY_B_CACHE_ALBUM_LIST);
////$redis->setCaches($testArray,'id');
//echo "设置完成" .PHP_EOL;
//$fields = array_column($testArray,'id');
//
//$fields = array_merge($fields,[1,2]);
//$arr = $redis->getCaches($fields);
////$arr = $redis->getKeys('B:CACHE:ALBUM_LIST*');
//
////$client = $redis->redisClient();
////foreach ($arr as $item) {
////    $client->del($item);
////}
//echo "</pre>";
//print_r($arr);
//echo "</pre>";
//die();
//
//
//
//
//
